/**
 * @author Viktar Liaskovich
 */
package com.devunion.bogdan.view;

import com.devunion.bogdan.view.actions.ActionManager;

public class StartPanelManager {
    private static StartPanelManager instance;

    private StartPanel startPanel;

    private StartPanelManager() {
        startPanel = createStartPanel();
    }

    public static StartPanelManager getInstance() {
        if (instance == null) {
            instance = new StartPanelManager();
        }

        return instance;
    }

    public StartPanel getStartPanel() {
        return startPanel;
    }

    private StartPanel createStartPanel() {

        StartPanel startPanel = new StartPanel();

        startPanel.addActionToTheLeftColumn("<html><u>Create New Project</u></html>", "Create New Project", ActionManager.getInstance().newProjectAction);
        startPanel.addActionToTheLeftColumn("<html><u>Open project</u></html>", "Open project", ActionManager.getInstance().openProjectAction);
//        startPanel.addActionToTheLeftColumn("<html><u>Manage projects</u></html>", "Manage existing Projects", ActionManager.getInstance().manageProjectsAction);

//        startPanel.addActionToTheRightColumn("<html><u>View Projects Base</u></html>", "View Projects Base", );
        startPanel.addActionToTheRightColumn("<html><u>Help</u></html>", "Help", ActionManager.getInstance().helpAction);

        startPanel.pack();

        return startPanel;
    }

}
